@extends('layouts.backend')
@section('title')
    添加管理员
@endsection

@section('body')
    <div class="row">
        <div class="ibox">
            <div class="ibox-title">
                <h5>添加管理员</h5>
                <a href="{{route('backend.admin.index')}}" class="btn btn-primary pull-right">返回列表</a>
                <div class="clearfix"></div>
            </div>
            <div class="ibox-content">

                <div class="row">
                    <div class="col-md-8">
                        <form method="post" class="form-horizontal" >
                            @csrf
                            <div class="form-group">
                                <label >用户名@include('components.backend.required')</label>
                                <input type="text" name="name" placeholder="请输入用户名" class="form-control" required>
                            </div>
                            <div class="form-group">
                                <label >Email @include('components.backend.required')</label>
                                <input type="text" name="email" placeholder="请输入邮箱" class="form-control" required>
                            </div>
                            <div class="form-group">
                                <label >密码@include('components.backend.required')</label>
                                <input type="text" name="password" placeholder="请输入密码" class="form-control" required>
                            </div>
                            <div class="form-group">
                                <label >再输入一次密码@include('components.backend.required')</label>
                                <input type="text" name="password_confirmation" placeholder="请再输入一次密码" class="form-control" required>
                            </div>
                            <div class="form-group">
                                <label>角色 @include('components.backend.required')</label>
                                <select name="role_name[]" multiple="multiple" class="form-control">
                                    @foreach($roles as $role)
                                        <option value="{{ $role->name }}">{{ $role->name }}</option>
                                    @endforeach
                                </select>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                    <button class="btn btn-primary" type="submit">添加</button>
                            </div>
                        </form>
                    </div>
                </div>

        </div>
    </div>
</div>
@endsection
